const AutoImport = require('unplugin-auto-import/webpack')
const Components = require('unplugin-vue-components/webpack')
const { ElementPlusResolver } = require('unplugin-vue-components/resolvers')


module.exports = {

    lintOnSave: true,
    devServer: {
        overlay: {
              warnings: true,
              errors: true
        },
        port: 4396,
        proxy: {
              "/opon": {
                    // target: "http://127.0.0.1:8080/opon",
                    target: "http://localhost:8080/opon/",
                    // ws: true,
                    changOrigin: true,
                    pathRewrite: {
                        '^/opon': ''
                    }
              }
        }
    },
    configureWebpack: {
        plugins: [
            AutoImport({
                resolvers: [ElementPlusResolver()],
            }),
            Components({
                resolvers: [ElementPlusResolver()],
            }),
        ]
    }

};
